home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_i_l / incx101a.zip / INC-DOCS.LZH / LHA.DOC < prev   
Text File  |  1991-04-08  |  31KB  |  876 lines

  1. ------------------------------------------------------------------------
  2.                        Manual for LHA Version 2.12
  3.  
  4.                                                  Ver 2.12  21 March 1991
  5. ------------------------------------------------------------------------
  6.                              NIFTY-Serve  SDI00506    HARUYASU YOSHIZAKI
  7.                              ASCII-pcs    pcs02846    Yoshi
  8.                              PC-VAN       FEM12376
  9. ------------------------------------------------------------------------
  10.  
  11.      This is a manual for the public release of LHA.EXE.v 2.12. LHA
  12.      is an upward compatible and improved version of LH Ver 1.13C.
  13.      Since Microsoft's DOS 5.0 now has an interior command LH (for
  14.      Load High), the name has been changed from LH.EXE to LHA.EXE.
  15.  
  16.  
  17. 0.  To begin with
  18. -----------------
  19.  
  20.      This is a revised version of LH113c.EXE, an archiver which was
  21.      rather slow in execution but tight in compression rate.  I am
  22.      grateful for the support of LH113c's users both in Japan where
  23.      the .LZH file is a standard archived file name and in other
  24.      countries where .LZH has become well-known and used often.  I
  25.      have been  working on this new version for two years since the
  26.      last release of LH113c.EXE.  I am now glad to announce the re-
  27.      lease of LHA. I am constantly upgrading upon user's report on
  28.      bugs and on new requests.
  29.  
  30.  
  31.      LHA differs from LH113c:
  32.      -----------------------
  33.  
  34.      LHA is better than LH Ver 1.13 in compression rate, especially
  35.      with large files.  There are a few exceptions if using rather
  36.      small files.  (Under 1 Kb.)  LHA is faster than LH113c in de-
  37.      compressing, with new static Huffman coding, compared with the
  38.      older dynamic Huffman.  The speed of compression is not as fast
  39.      as I was expecting.  <Sigh>
  40.  
  41.      LHA needs more memory than LH113c did.  If there is not enough
  42.      for LHA to work, it may have looser compression rate, although
  43.      it tries to continue execution.  LHA is upward compatible with
  44.      LH113c.  But LH113c is not completely compatible with the LHA
  45.      format.  Please switch from LH113c to LHA as soon as you can.
  46.      With the "/o" option, you can make archives dearchivable by
  47.      LHarc Ver 1.xx - otherwise LHarc will complain for "unknown
  48.      method".
  49.  
  50.      LHA is distributed as a free program with copyright reserved.
  51.      There is no restriction for the use within private corporations
  52.      or the use for governmental agencies.  Users must be respon-
  53.      sible for the use of facilities of the software, especially of
  54.      the auto ! batch file (Often called a "Telop file).  The soft-
  55.      ware is distributed as is.  I am not liable for any damage
  56.      caused by the use of this software.  For commercial use, please
  57.      refer to our distribution policy.
  58.  
  59.      You can now proceed to read the complete description of com-
  60.      mands and options.  However, if you are not familiar with what
  61.      an archiver is, please refer to the introductory note LHA.HLP
  62.      written especially for LHA.EXE by late Irvin Hoff.
  63.  
  64.  
  65. 1.  Usage
  66. ---------
  67.  
  68.   A.  General Format:
  69.   ==================
  70.  
  71.     LHA <command> [/<option> ARC [[DIR\] [FILE]...]...  [-+012|WDIR]...]
  72.  
  73.  
  74.     <command>: if one is not used, you get the help screen or a list of
  75.                FILE(s).
  76.     <option>:  you may supply one or more of options explained below.
  77.                (needs an  /  or  -  in front, to designate an option)
  78.  
  79.     ARC:       archive name.
  80.     DIR:       base directory name.
  81.     FILE:      File name or full pathname if specified.
  82.     WDIR:      Working Directory name.
  83.  
  84.  
  85.   B.  <command>
  86.   =============
  87.  
  88.    a (Add) compress and add to an archive.
  89.  
  90.      Compress and Add files specified to an archive.  If the named
  91.      archive does not exist, then create one with the name.  LHA
  92.      overwrites any file in the archive by the given file name with
  93.      'a' command.  Compare with 'u' command.
  94.  
  95.      The commands 'a' and 'm' are used to make an archive.
  96.  
  97.      < Example 1 >  LHA a EX *.EXE
  98.  
  99.      LHA makes an archive named EX.LZH from all the files with ex-
  100.      tension 'EXE'.  Extension .LZH is default.
  101.  
  102.  
  103.    u (Update) Compress and Update.
  104.  
  105.      Compress and add files specified to an archive as command 'a'.
  106.      If LHA detects a file with the name same as the one in the
  107.      archive, then LHA selects the new one to add to archive, by
  108.      comparing the time stamp of each.
  109.  
  110.      < Example 2 > LHA u EX *.C
  111.  
  112.      All the FILE(s) with extension '.C' are archived in EX.LZH.
  113.      If you already have an SX.LZH containing a FILE with the same
  114.      name, only the one with newer time stamp is archived.
  115.  
  116.  
  117.    m (Move)
  118.  
  119.      Compress and add to an archive as 'u' command with checking
  120.      time stamps.  The difference is that LHA deletes all the files
  121.      moved into the archive.
  122.  
  123.      < Example 3 > LHA m EX *.C
  124.  
  125.      does  the same as
  126.  
  127.                   LHA u EX *.C
  128.                   del *.C
  129.  
  130.      Watch the second line.  With the /C option, LHA removes all the
  131.      FILE(s) into the ARChive ignoring time stamps.  You may lose
  132.      the one with the older time stamp.
  133.  
  134.  
  135.    f (Freshen)
  136.  
  137.      LHA looks for a FILE with the same name as the FILE in the
  138.      archive.  If it finds one with a newer time stamp, LHA
  139.      rewrites the one in the archive.  'LHA f /c ARC ' will not
  140.      check the time stamp.
  141.  
  142.      < Example 4 > LHA f EX LHA.DOC
  143.  
  144.      You have LHA.DOC compressed and archived in EX.LZH.  You get a
  145.      new LHA.DOC, then you replace the one in the ARChive, also.
  146.  
  147.  
  148.    d (Delete)
  149.  
  150.      LHA deletes a file (or files) in the archive.
  151.     
  152.      < Example 5 > LHA d ex lha.doc
  153.  
  154.      LHA deletes lha.doc in the ARChive ex.LZH.
  155.  
  156.    e (Extract)
  157.  
  158.      LHA extracts FILE(s) from the archive with decompressing.  If
  159.      LHA finds a FILE in the archive with a newer FILE on the same
  160.      DIR and having the same name, it skips that FILE(s).  LHA
  161.      extracts FILE(s) from ARChives made by L113C, namely, those
  162.      with the compression ids -lzs-, -lz4-, -lz5-.
  163.  
  164.      <Example 6 > LHA e EX 
  165.  
  166.      Extracts all the FILE(s) in the archive 'EX.LZH'.
  167.  
  168.      < Example 7 > LHA e EX *.COM
  169.  
  170.      LHA extracts all the files with extension .COM from 'EX.LZH'.
  171.  
  172.  
  173.   x (eXtract) LHA eXtracts compressed FILE with pathnames.
  174.  
  175.      If LHA can not find any path, then it will create directories.
  176.      FILE(s) must be archived with full-pathnames.  LHA restores the
  177.      entire directory structure.  'LHA e /x1m1 ARC' does the same.
  178.  
  179.      < EXample 8 > LHA x EX
  180.  
  181.      Suppose '\BIN\CG86.EXE' were among the FILE(s) in 'EX.LZH'.  LHA
  182.      creates directory '\BIN' if necessary, and extracts 'CG86.EXE'
  183.      there.
  184.  
  185.  
  186.    p (Print) Print FILE on standard out.
  187.  
  188.      LHA prints FILE decompressing from ARC to standard output.
  189.  
  190.      < Example 9 >  LHA  p ex lha.doc
  191.  
  192.      LHA extracts 'LHA.DOC' from 'EX.LZH' and displays it on your
  193.      terminal.
  194.  
  195.      < Example 10 > LHA p EX LHA.DOC > prn
  196.  
  197.      LHA extracts 'LHA.DOC' from 'EX.LZH' and prints it out from
  198.      your printer.
  199.  
  200.  
  201.    l (List)
  202.  
  203.      LHA lists FILE names in the archive on a line.  A FILE with
  204.      pathname will have a mark '+' on the head of the line.  'LHA
  205.      l /x ARC' shows full-pathnames of FILE(s) in ARC, and in 2 lines
  206.      per FILE.  You need not type 'l' to have the list.
  207.  
  208.      <Example 11> LHA LHA212.EXE
  209.  
  210.      LHA assumes command 'l' and shows list of FILE(s) archived FILE
  211.      per line.
  212.  
  213.      < Example 11x > LHA /x LHA212.EXE
  214.  
  215.      You get a similar list but full-pathnames are inserted, and
  216.      each FILE is shown on two lines.
  217.  
  218.      NOTE:  Forward slash '/' is used as the pathname separator.
  219.  
  220.  
  221.    v (View)
  222.  
  223.      'LHA v ARC' is the same with 'LHA l /x ARC'.
  224.  
  225.  
  226.    t (Test)
  227.  
  228.      Check the integrity of ARC, by CRC check.
  229.  
  230.      LHA t LHA.EXE or LHA t LHA212.EXE
  231.  
  232.      will announce the authenticity of the file you own.
  233.  
  234.            LHA t LHA.EXE
  235.  
  236.      "This file seems to be ORIGINAL distributed from H.Yoshi."
  237.  
  238.      LHA.EXE tests itself for you.  This guarantees the version you
  239.      have is not hacked by anyone, though it is not the full guaran-
  240.      tee in the present state of art.  You can't check LHA.EXE if
  241.      you have used executable file compressors such as LZEXE, PKLITE
  242.      or DIET.
  243.  
  244.      < Example 12 > LHA t EX
  245.  
  246.      LHA tests integrity of the FILE(s) in 'EX.LZH'.
  247.  
  248.      < Example 13 > LHA t LHA.EXE
  249.  
  250.      LHA checks if LHA.EXE is the original file distributed.
  251.      
  252.      It has often been asked that files made by LHarc v 1.xx
  253.      fail this test. You cannot test LHARC.exe with this test.
  254.      If you get an answer "file corrupt", don't get panic.
  255.      These files often have extra padding in the back of the file.
  256.  
  257.    s (Self-extract)
  258.  
  259.      LHA makes a Self-Extracting archive from ARC.LZH.  The default
  260.      switch /x0 is assumed when you do not specify.  SFX made with
  261.      the /x0 switch, small model, extracts files on the current
  262.      directory.  You can't activate some programs in the archived
  263.      FILE(s) automatically with small model.  The size of the SFX file
  264.      is smaller than those made with /x1 switch, large model.
  265.  
  266.      The large model SFX has the ability to restore subdirectory
  267.      structures and can automatically start execution from a FILE
  268.      inside the archive.
  269.  
  270.      < Example 14 > LHA s EX
  271.  
  272.      In this case, LHA makes a small model EX.EXE from EX.LZH.
  273.      
  274.      We had many inquiries that LHA does not make SFX file.
  275.      You must first make LZH file by 'a' or 'm' command. Then
  276.      you use 's' command to make it a self-extracting file.
  277.  
  278.  
  279.   C.  </option>
  280.   =============
  281.  
  282.      Each option takes 3 numerical values to define its finer
  283.      actions.  Use 0,1 and 2 to specify.  For some options, the
  284.      values 1 and 2 does the same thing.  You may toggle 0 and 1 by
  285.      '+' and '-" as with LH113c.  You may change switch character
  286.      (option) from  /  to  - if you prefer the '-'.
  287.  
  288.      /x[0|1] (eXtend)
  289.  
  290.  
  291.      LHA uses eXtended FILE names, namely full-pathnames for FILE(s).
  292.  
  293.      You are on the root directory.  Suppose you want to archive the
  294.      FILE '\tc\include\sys\stat.h' in an archive 'ARC.LZH'.  You type
  295.      'LHA a /x1 ARC.LZH \tc\include\sys\stat.h' to store the FILE
  296.      with full-pathname,'\tc\include\sys\stat.h'.  Similarly, you
  297.      have a 2-lined list with full-pathnames with 'l' command.
  298.  
  299.      /p[0|1|2] (Precise)
  300.  
  301.  
  302.      Search file names precisely.
  303.  
  304.      Suppose an ARChive 'TC.LZH' contains both 'STAT.H' and
  305.      'SYS\STAT.H'.  A simple command like 'LHA e TC stat.h' will
  306.      extract both files on the current directory and let one
  307.      override the other.  To avoid such confusion, you can type 'LHA
  308.      e -p TC stat.h' to extract 'STAT.H' only.  While by typing 'LHA
  309.      e -p TC sys\stat.h' you will get 'SYS\STAT.H'.
  310.  
  311.      /c[0|1|2]  (ignore Comparison of time)
  312.  
  313.  
  314.      With commands 'u', 'f', 'e', 'x', LHA ignores the checking of
  315.      time stamps.  With these commands, LHA chooses the newest FILE
  316.      with the same pathname to act on, by default.  This option lets
  317.      LHA ignore the time stamps.
  318.  
  319.  
  320.      /m[0|1|2]  (no Message)
  321.  
  322.      The switch '/m1' let LHA assumes answer 'Y' for all the
  323.      queries. "LHA e /m1 ARC" will extract files in ARC.LZH
  324.      wherever "Y" is typed for the queries "Overwrite? [Y/N]"
  325.      are asked. If there is a file in the directory with the
  326.      same name but with attribute read-only, LHA reports
  327.      'file creation error'. Similarly LHA creates new directory
  328.      if it meets 'Directory DIR does not exit. Create [Y/N]'.
  329.    
  330.      On the other hand, with '/m2' switch LHA acts differently.
  331.      'LHA e /m2 ARC.LZH FILE' dearchives every FILE by choosing
  332.      an unused file extension among 000-999, when LHA finds
  333.      FILE(s) with the same name as in the ARChive.
  334.  
  335.      /a[0|1] (any Attribute)
  336.  
  337.  
  338.      This switch enables LHA to archive FILE(s) with any attributes.
  339.  
  340.      In the process of archiving with default switch /a0, LHA will
  341.      not archive FILE(s) with hidden and system attributes.  FILE(s)
  342.      with read-only attribute is archived with the attribute. With
  343.      this switch on, '/a1', FILE(s) of any attribute are archived
  344.  
  345.      In the process of dearchiving, with /a1, dearchived FILE(s)
  346.      preserve their original attributes. With /a0, you can't
  347.      dearchive files with hidden and system attributes.  Read-only
  348.      FILE(s) are dearchived deprived of their original attribute.
  349.  
  350.      /r[0|1|2] (Recursive)
  351.  
  352.  
  353.      LHA archives and extracts files recursively from subdirect-
  354.      ories.  'Recursively' means LHA searches all FILE(s) from all
  355.      subdirectories under the specified directory if there is any.
  356.  
  357.      There are three different modes for the '/r' switch.
  358.  
  359.      /r0: (non-recursive mode, default)
  360.  
  361.  
  362.      LHA collects files specified by path names only.
  363.  
  364.      /r1:
  365.  
  366.  
  367.      LHA separates the given pathname into a directory name and FILE
  368.      name.  LHA recursively collects FILE(s) with the given name from
  369.      all the directories under the directory specified.
  370.  
  371.      < Example 15 > LHA a /r1 SOURCE.LZH \SOURCE.C\SOURCE\*.H
  372.  
  373.      LHA collects FILE(s) with extension C and H from the directory
  374.      \source and its subdirectories, probably '\SOURCES\SAMPLES\*.C'
  375.      but not '\SOURCE\*.OBJ'.
  376.  
  377.      /r2:
  378.  
  379.  
  380.      LHA recursively collects all the files from all the specified
  381.      subdirectories.  Tree structure of the specified directory is
  382.      archived as it is.
  383.  
  384.      < Example 16 > LHA a /r2x1 a:\*.*
  385.  
  386.  
  387.      NOTE:  LH113c has set /x whenever /r is set in 'e' or 'x'
  388.             commands.  LHA differs from LH113c in that /x is
  389.             not set with /r automatically.
  390.  
  391.      The following questions are the most frequently asked ones:
  392.  
  393.      (1) How do you backup a disk a: ?
  394.  
  395.                         LHA a /r2x1 LZH a:\
  396.  
  397.      (2) Then how do you retrieve all the directories and files on
  398.          b:?
  399.  
  400.                         LHA x ARC.LZH b:\
  401.  
  402.  
  403.      /w[0|1|<Directory Name>] (Work directory)
  404.  
  405.      Specify the directory name where LH makes temporary files.
  406.  
  407.                         LHA a /wd:\  ARC.LZH FILE(s)
  408.  
  409.      set -w switch on.
  410.  
  411.      By default, LHA makes all the temporary files on the directory
  412.      where ARC.LZH is to be made.  It will rename the temporary file
  413.      as ARC.LZH.
  414.  
  415.      LHA makes temporary files on the current directory if no name
  416.      is specified with '/w+'.
  417.  
  418.      When you set Environmental variable 'TMP' this switch is set
  419.      automatically to be 1, and you have the directory set by 'TMP='.
  420.      as your working directory.
  421.  
  422.      The switch helps LHA when you have not enough room in your base
  423.      directory, or when you have a high speed memory device like RAM
  424.      disk or HARD ram.
  425.  
  426.  
  427.  
  428.  
  429.      /t[0|1] (Time stamp)
  430.  
  431.      With command a,u,m,f,d reset time stamp of ARC.lzh according to
  432.      the newest file in the archive.  By default, the time stamp of
  433.      an ARC.LZH is the time when the ARC.LZH is made.
  434.  
  435.  
  436.      /z[0|1|2] (Zero compression)
  437.  
  438.      LHA makes an archive without compressing.
  439.  
  440.      /z1: None of the FILE(s) is compressed
  441.  
  442.      /z2: Compress and archive except for the FILE(s) with exten-
  443.           sions:
  444.  
  445.                .ARC, .LZH, .LZS, .PAK, .ZIP, .ZOO.
  446.  
  447.      /z<extension>:  Do not compress FILE(s) with the specified
  448.      extension.  This switch assumes /z2.  You may use wild card to
  449.      specify, and you may or may not put '.' in front of the exten-
  450.      sion.  With '/zdbf' you don't compress FILE(s) with extension
  451.      '.DBF'.  With '/z' you will not have FILE(s) with no extension
  452.      compressed.  You may specify multiple extensions by writing
  453.      sequentailly:
  454.  
  455.                LHA a /ZCOM /ZERO ARChive.LH *.*.
  456.  
  457.      /o[0|1] (Old compatible compression)
  458.  
  459.      LHA makes an archive compatible with the LH113c format.  Even
  460.      in this case, LHA makes tighter compression than LH113c ver
  461.      1xx.  The header id is automatically set to -h1.
  462.  
  463.      /h[0|1|2] (Header level)
  464.  
  465.      Choice of header level, default is /h0.
  466.  
  467.  
  468.      /i[0|1] (don't Ignore case)
  469.  
  470.      Recognize Upper and Lower cases.  LH(arc)s have common header
  471.      format in other OS's where cases are recognized as distinct.
  472.      This option is prepared for dearchiving archives made by other
  473.      OS'.  In the DOS version of LHA, you can't differentiate upper
  474.      and lower when LHA archives FILE(s) into the archive.  Names
  475.      are all stored in upper case.
  476.  
  477.      /n[0|1|2] (No indicator)
  478.  
  479.      In this version, LHA outputs compressing indicator "ooo....."
  480.      to standard error.  The switch is to suppress this output.
  481.  
  482.      /n1: LHA disables output "ooo....." to indicate its progress.
  483.  
  484.      /n2: LHA disables outputs of filename, compression rates.
  485.  
  486.  
  487.      /l[0|1|2] (Long display ).
  488.  
  489.      LHA outputs filenames in different formats when LHA archives
  490.      and dearchives.
  491.  
  492.       /l0 : FILE names only.
  493.       /l1 : Full-pathnames stored or to be stored in archive in 2 lines.
  494.       /l2 : Full-pathname of FILEs accessed by LHA in 2 lines.
  495.  
  496.      < Example 16 > LHA a /r1x1l2 LINK.LZH c:\LINK.*
  497.  
  498.      LHA collects LINK.* with full-pathname from directories below
  499.      c:\, with information from where LHA gets this FILE(s).
  500.  
  501.  
  502.      /-[1|2] (The first letter switch).
  503.  
  504.      LHA recognizes the characters '-' and '@' as the first letter
  505.      of a FILE name.  By default, any file beginning with '@', like
  506.      '@xxx' is recognized as a Response File 'xxx'.  
  507.  
  508.      With
  509.      '/-1' switch LHA reads '@' as a character in the file name,
  510.      while with switch
  511.      '/-2' LHA recognizes both '-' and '@' as characters.
  512.  
  513.      To exit from this mode specify '/-[0]'.  You cannot use '--0' 
  514.      in this particular case.  LHA believes '--0' as a file name.
  515.  
  516.  
  517.   D.  Base Directory.
  518.   ==================
  519.  
  520.      Base directory is not the current nor the root directory.  It
  521.      is the directory on which LHA is executed.  Or you may believe
  522.      that you move to this directory and execute LHA from there. You
  523.      may specify a number of directories as your base directories.
  524.  
  525.  
  526.   < Example 17 > LHA x program c:\BIN\ *.EXE *.COM c:\TEMP\ *.MAN *.DOC
  527.                               ~~~~~~~             ~~~~~~~~
  528.  
  529.      Suppose you are on the directory d:\.  You want to extract
  530.      files with extensions .COM and .EXE on c:\BIN, and those with
  531.      extensions .MAN and .DOC on the directory c:\TEMP.  This is
  532.      equivalent to the following set of command lines:
  533.  
  534.              D>C:
  535.              C>CD \BIN
  536.              C>LHA x D:\program *.COM *.EXE
  537.              C>cd \TEMPp
  538.              C>LHA x D:\program *.MAN *.DIX
  539.  
  540.      Naturally, you can't dearchive a single FILE on multiple di-
  541.      rectories.  The directory specified first has the priority.
  542.  
  543.  
  544.   E.  DOS redirection and response file
  545.   =====================================
  546.  
  547.      LHA can't accept too many file names on a command line due to
  548.      MS-DOS's restriction.  To avoid this inconvenience, LHA now
  549.      accepts PIPES and REDIRECTS of DOS.  Besides, LHA can use work
  550.      file called response file to record the names of the files to
  551.      be archived like MAKEFILE for some compilers.
  552.  
  553.  a.  Response File.
  554.  
  555.      The response file name will be marked with the letter '@' as of
  556.      LINK.EXE, which is a text file.  You may just write whatever
  557.      you want LHA to be done on this file.  Response file ignores CR
  558.      code and uses space as a separator.  You may write options in
  559.      the response file but you can't nest, calling other response
  560.      file, file names.
  561.  
  562.  
  563.  b.  DOS Pipes and Redirects.
  564.  
  565.      You may specify the same information supplied by a response
  566.      FILE by using pipes or redirections.  You may create a response
  567.      FILE by redirection.
  568.  
  569.      < Example 18 > LHA l /n1 PARTS > FILE(s)
  570.                     LHA a NEWPARTS @FILE(s)
  571.  
  572.      Make a list of files in the 'PARTS.LZH' archive and use it to
  573.      make a new ARChive 'NEWPARTS.LZH'.  This is done by using the
  574.      response files, after some editing.
  575.  
  576.      < Example 19 > LS | SORTR | LHA a ALL ls -c | LHA a ALL
  577.  
  578.      Make a list of files in a directory by LS.EXE.  Sort file names
  579.      and make a sorted archive ALL.LZH.  Beware of the various for-
  580.      mats from output of LS.EXE.  LS.EXE is supposed to list files
  581.      one name per line without any attributes or time stamps.  LS
  582.      designed after UNIX will do the trick by "ls -c" or "ls -C".
  583.      C or c stand for "sorted by columns".
  584.  
  585.  
  586.   F.  Environmental Variables
  587.   ===========================
  588.  
  589.  a.  LHA and LHARC
  590.  
  591.      LHA overrides LHARC.  This will reset default optional.
  592.  
  593.  
  594.  b.  TMP
  595.  
  596.      Set working directory as -w option.  In case LHA recognizes no
  597.      working directory, it uses the current directory as the working
  598.      directory and creates temporary files on it.
  599.  
  600.  
  601.  c.  TZ
  602.  
  603.      The time zone (EST, PST, etc.) must be set when you archive
  604.      with the header level -h2- and when you dearchive with -h2-. In
  605.      the Eastern Standard Time zone you have to set TIME ZONE with
  606.      the DOS command: set TZ=EST+5.  Remember the default Remember
  607.      the default header level is -h1-, in which case you are all
  608.      set.
  609.  
  610.  
  611.   G.  Exit Codes.
  612.   ==============
  613.  
  614.      LH will return following result codes after batch or other
  615.      processes' execution.
  616.  
  617.      0.  Normal.
  618.  
  619.      1.  CRC error, probably with 'e','x','t' commands.
  620.  
  621.      2.  Fatal error.  Process terminated without transactions.
  622.  
  623.      3.  Failed to write temporary files in the archive.  You may
  624.          find a temporary file LHTEMP)2(.LZH on your working direct-
  625.          ory.  You may rename this file with extension LZH, and use
  626.          it as an archive.
  627.  
  628.  
  629.   H.  Working File Names
  630.   ======================
  631.  
  632.        LHTMP)1(.LZH : Old ARChive renamed.
  633.        LHTMP)2(.LZH : Working file to be renamed as ARChive.
  634.  
  635.  
  636. 2.SFX, Self-Extracting archive
  637. ------------------------------
  638.  
  639.       General Usage:
  640.  
  641.          SFX.EXE [/x] [/!] [/eDIR] [DIR]
  642.  
  643.            /x: do not create new directory.
  644.            /!: auto-execution batch enable.
  645.            /a: restore file attributes.
  646.            [/eDIR],[DIR]; specify directory to extract.
  647.  
  648.  
  649.          SFX.EXE is an executable file with FILE(s) stored in
  650.          the archive to be automatically extracted by exe-
  651.          cution.  All the LHA distribution will be in the
  652.          Self-Extracting (SFX) .EXE-format.  Only LHA.EXE makes
  653.          SFX files from archive *.LZH made by LHA.EXE.  You
  654.          can't make a Self-Extracting executable file from the
  655.          archive made by 'LH113c.1.xx'.
  656.  
  657.      LHA makes two models of SFX files: (a) the small model and (b)
  658.      the large model according to the switch /x0 or /x1, with the
  659.      following special functions.
  660.  
  661.  
  662.    A.  Telop.
  663.    =========
  664.  
  665.      LHA displays any file with name '!' if SFX.EXE finds it
  666.      archived. LHA holds one screen after showing [Y/N] prompt.  LHA
  667.      proceeds to execute if it receives 'Y'.  It quits (aborts)
  668.      execution for 'N'.  (The '!' character was used as it is the
  669.      first printing character.  A file starting with '!' will always
  670.      be the first file in that archive.)
  671.  
  672.  
  673.    B.  Directory Specification.
  674.    ===========================
  675.  
  676.      This is possible only for the large model.  You can name the
  677.      directory on which to execute SFX.EXE.
  678.  
  679.      < Example 20 > LHA212.EXE c:\user
  680.  
  681.      LHA extracts FILE(s) in LHA212.EXE on C:\USER.  You may of
  682.      course type:
  683.  
  684.                 LHA e /x0 LHA212.EXE c:\user ,
  685.  
  686.      to keep the TELOP file.
  687.  
  688.  
  689.    C.  Auto Execution
  690.    ==================
  691.  
  692.      This is possible only for large models.
  693.  
  694.      Archive a batch file with the name "!.BAT" and include it in
  695.      the SFX file.  This batch works if and only if you type:
  696.  
  697.                      LHA212 /!
  698.  
  699.      LHA always extracts files on the current directory.  Any
  700.      existing "!.BAT" file is overwritten.  You can't activate an
  701.      existing !.BAT by using the "/!" switch even if there is one on
  702.      the current directory.  The batch file is read if and only if
  703.      it is archived in the SFX file.
  704.  
  705.      Two Models of Self-Extracting files are available:
  706.  
  707.  
  708.  a.  Small Model  (LHA s SFX.LZH)
  709.  
  710.      This is the default model.
  711.  
  712.      LHA ignores the directory structures even if you make the
  713.      archive file with the /x or /r[1|2] switch.  LHA holds only the
  714.      FILE names.  SFX.EXE extracts files to the current directory.
  715.  
  716.      There is no limit on the size of SFX.EXE as there was for
  717.      LH113c.
  718.  
  719.  
  720.  b.  Large Model  (LHA s /x1 SFX.LZH)
  721.  
  722.      You can run a batch file to specify the directory to extract
  723.      files.  You can retrieve original directory structures with
  724.      this model.  You may refrain from creating unexpected
  725.      structures by using the /x switch.
  726.  
  727.  
  728. 3.  Main Differences from LH113c
  729. --------------------------------
  730.  
  731.      LHA is an improved version of LH113c in principle.  You will
  732.      notice a number of differences between the two, when comparing.
  733.      Some of the differences will be mentioned at this time.  (You
  734.      may wish to read the LH113c manual for a better comparison if
  735.      anything appears confusing.)
  736.  
  737.      FILE names are not sorted when entered into an archive.  They
  738.      are entered in the order in which they appear in the directory,
  739.      when using wild cards.  (This is different from LH113c.) 
  740.      If you specify the order of FILE, then the order is
  741.      reproduced in the archive.  If you add new FILE(s), they will
  742.      be added at the end of the existing files.
  743.  
  744.      There are external utility programs by other authors which you
  745.      may use to sort the FILE names in your directory prior to
  746.      adding them to the archive.  Some programs actually resort the
  747.      archive itself.  Few include LH113c archives as LH113c already
  748.      sorted those.  LHA210 doesn't.  By using a 'pipe' you can type:
  749.  
  750.      < Example 21 >   LS *.C *.H | SORT | LHA a EX.
  751.  
  752.      LHA collects FILE(s) with extensions C and H sorted in the
  753.      archive named 'EX.LZH'.
  754.  
  755.      With LHA, the /r switch does not necessarily activate the /x
  756.      switch in extraction. In this version of LHA, the 'x' command
  757.      is equivalent to using 'E /x1m1', namely, LHA restores all the
  758.      tree structures of subdirectories.
  759.  
  760.      LHARC executed an AUTOLARC.BAT file by key word upon self-
  761.      extracting.  LHA no more uses keyword comparison.  If a SFX
  762.      file contains an !.BAT file, the batch is activated by '-!'
  763.      following the executable file name.
  764.  
  765.      The time stamp of LHA is relatively counted from 1970-01-01,
  766.      00:00:00 UTC by seconds.  You must be careful not to set date
  767.      or time which is illusory, like 00-00-00.  LHA will display
  768.      some indefinite date from overflow of the counter.
  769.  
  770.  
  771. 4.  Our distribution Policy
  772. ---------------------------
  773.  
  774.      This software, this document and LHA.EXE, is a copyright-
  775.      reserved free program.  You may use, copy and distribute this
  776.      software free of charge under the following conditions.
  777.  
  778.   1.  Never change Copyright statement.
  779.  
  780.   2.  The enclosed documents must be distributed with as a package.
  781.  
  782.   3.  When you have changed the program, or implemented the program
  783.       for other OS or environment, then you must specify the part
  784.       you have changed.  Also make a clear statement as to your name
  785.       and MAIL address or phone number.
  786.  
  787.   4.  The author is not liable for any damage on your side caused by
  788.       the use of this program.
  789.  
  790.   5.  The author has no duty to remedy for the deficiencies of the
  791.       program.
  792.  
  793.   6.  When you are to distribute this software with publications or
  794.       with your product, you have to print the copyright statement
  795.       somewhere on the disk or on the package.  You cannot
  796.       distribute this software with copyprotected products.
  797.  
  798.  
  799.           As long as those conditions are satisfied, you do not
  800.           need to get the author's permission to use or to dis-
  801.           tribute the software.
  802.  
  803.  
  804. 5.  How to contact the author.
  805. ------------------------------
  806.  
  807.      Please send MAIL to Forum flabo on Nifty Serve.  Go Nifty on
  808.      CompuServe and read the instructions there.  Your inquiries or
  809.      your questions are to be addressed to the one of the above
  810.      Nifty forums.  Direct MAIL to the author.
  811.  
  812.     My mail address :  SDI00506 | PFF00253 on Nifty Serve.
  813.                        pcs02846               ASCII-NET pcs.
  814.                        FEM12376               PC-VAN.
  815.  
  816.     Oversea Users may send inquiries, also, to K.Okubo to the address:
  817.                        [74100,2565]        on Compuserve,
  818.                        K.Okubo                Genie,
  819.                        c00236@sinet.ad.jp.    INTERNET,CSNET etc.
  820.  
  821.  
  822. 6. Acknowledgments
  823. -------------------
  824.  
  825.      I used the following softwares distributed on BBS.
  826.  
  827.      1. LSI-C86 ver 3.20 evaluation copy, from LSI Japan.
  828.  
  829.      2. A-MACROS /Structured Assembler Macros, from AMSCLS.INC
  830.         (c) Hortense S. Endoh 1986,1987 ver.2.10. I appreciate
  831.         the public distribution of these excellent softwares.
  832.  
  833.      What have I done in these days of rapidly changing software
  834.      technologies?  My LH113c has contributed for the improvements
  835.      of similar products such as PKZIP(tm) and PAK(tm).  Even with
  836.      my modest Japanese estimate, I can be proud of this achievement
  837.      at this time.  I thank all those people who supported and used
  838.      LH113c - voices of users have always been a constant encourage-
  839.      ment to me.
  840.  
  841.         I express my gratitude to Haruhiko Okumura and members
  842.         of SIG Science of PCVAN for the improvements of algo-
  843.         rithms,
  844.  
  845.         to K.Okubo who introduced and supported LH113c on over-
  846.         sea networks such as CompuServe and GEnie.
  847.  
  848.         to late Irvin Hoff, CP/M sysop Compusrve, who reviewed
  849.         the English version for spelling, grammar and English
  850.         phrasing while he was struggling with cancer,
  851.  
  852.         to K.Miki who introduced me to archivers and hold a
  853.         place for experiments,
  854.  
  855.         to members of LSI-Japan who offered excellent versions
  856.         of LSI-C, to the members of Forum FHONYAKU who prepared
  857.         the English manual, and finally to all who used LH113c
  858.         and supported it.
  859.  
  860.  
  861. 7.  Reference
  862. -------------
  863.   1.  Knuth, D.E., Dynamic Huffman Coding, J.Algorithms, 6:163-180.
  864.   2.  Kurita, T.   Harddisk Cook Book.  1987 Shoeisha,Tokyo.
  865.   3.  Kurita, T.  Tool Box of Computing, Huffman Coding, bit
  866.       70:100-101,1988.
  867.   4.  Okumura,K.,Masuyama,K.,Miki,K.  Practice and theory of Data
  868.       Compression.  The Basic, 70(March):1-65,1989.
  869.   5.  Fiala,E.R., and Greene,D.H., Data Compression with Finite Win-
  870.       dows, Comm.ACM, 32:490-595,1989.
  871.   6.  Okumura,H., and Yoshizaki,H.  Introduction to  Compression
  872.       Algorithm, C Magazine 3:1:44-68,1991.
  873.  
  874.                               - end -
  875.  
  876.